package jp.eisbahn.mgapi.http;

import java.util.Map;


public class HttpRequest {

    private String url;
    private Map<String, Object> parameterMap;
    private ContentType contentType;
    private HttpMethod method;
    private Map<String, String> headerMap;
    
    public HttpRequest(String url, Map<String, Object> parameterMap,
            HttpMethod method, ContentType contentType,
            Map<String, String> headerMap) {
        super();
        this.url = url;
        this.parameterMap = parameterMap;
        this.method = method;
        this.contentType = contentType;
        this.headerMap = headerMap;
    }

    public HttpRequest(String url, Map<String, Object> parameterMap,
            HttpMethod method, ContentType contentType) {
        this(url, parameterMap, method, contentType, null);
    }

    public String getUrl() {
        return url;
    }

    public Map<String, Object> getParameterMap() {
        return parameterMap;
    }
    
    public boolean isDoOuput() {
        return parameterMap != null;
    }

    public ContentType getContentType() {
        return contentType;
    }

    public HttpMethod getMethod() {
        return method;
    }

    public Map<String, String> getHeaderMap() {
        return headerMap;
    }
    
}
